<template>
    <input type="text" v-model="content" @keyup.enter = 'sent'>
</template>

<script setup>
import { ref } from 'vue'
let content = ref('')
const emit = defineEmits(['sentContent'])
// 回车添加待办事项
const sent = () => {
    emit('sentContent', content.value)
    content.value = ''
}
</script>